home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0020-MacApp scrolling an-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  1.7 KB  |  40 lines  |  [TEXT/GEOL]

  1. Item    4023801                         5-Aug-89        13:09
  2.  
  3. From:   D4132                           Farallon, R & D, PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     MACDTS                          Macintosh Developer Technical Supt.
  8.         MOOF                            Rollin, Keith A, APL
  9.         D4132                           Farallon, R & D, PRT
  10.  
  11. Sub:    MacApp scrolling and bitmaps
  12.  
  13. I’m trying to figure out the best way to integrate MacApp’s implementation of
  14. scrolling with an application that requires the use of offscreen bitmaps. The
  15. document I’m trying to display is, in general, too large to keep an offscreen
  16. bitmap of the whole thing, so my offscreen is only as large as the window,
  17. which means it has to be scrolled and updated.
  18.  
  19. The obvious solution is just to overide TScroller.ScrollDraw to scroll my
  20. offscreen and then blit it to the screen.  I’m reluctant to do this since
  21. ScrollDraw is a rather low-level method which, according to the manual is
  22. “...rarely overridden, and even more rarely called from application code.” It’s
  23. sort of reminiscent of patching traps: for a while everyone did it, then it was
  24. discouraged, frowned upon, and finally almost outlawed.
  25.  
  26. So my question is two-fold:  1) Is it bad karma to overide low-level methods
  27. such as ScrollDraw? and if so, 2) what’s a better way to accomplish the desired
  28. result?
  29.  
  30. One solution I thought about was switching bitmaps behind ScrollDraw’s back, so
  31. that it would actually scroll my offscreen for me. Part of the problem with
  32. this is that it eventually calls my Draw method which has to figure out that a
  33. portion of the offscreen actually needs redrawing. Ideally, you just want the
  34. Draw method to be a CopyBits call.
  35.  
  36. Joe Sensendorf
  37. Farallon Computing
  38. D4132
  39.  
  40.